-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability to de/serialize from/to avro container. #119
base: master
Are you sure you want to change the base?
Added ability to de/serialize from/to avro container. #119
Conversation
* Added `AvroConvert.DeserializeContainer()` for deserialization (of IEnumerable<>). * Added `AvroConvert.SerializeContainer()` for serialization (of IEnumerable<>). * Added `IsEnumerable()` to `Type` extensions. * Workaround for deserialization added to `Resolver.ResolveArray()` * Added some [basic] tests.
Thank you for your contribution, I will do my best to review it today. Looks pretty nice at first glance! |
Updated code summary. Removed unused code. Enforced `IEnumerable` on `DeserializeContainer<T>(...)` methods.
Pushed a bug-fix and some enhancements. |
@@ -0,0 +1,146 @@ | |||
#region license |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default AvroConvert.Deserialize() method handles objects serialized in this way correctly. Could you please revert the changes done in the deserialization part?
Very nice PR, thank you. Just two minor comments from my side. When you address them, I will merge the PR, write a short doc, and create the next release. |
@AdrianStrugala @wdcossey what's the decision with this PR ? In general it looks like a deviation from an
From the other side, this is potentially a breaking change. While I would suggest to make a decision and implement this change in the library as there are big perf improvements
Benchmark used to compare nuget
|
Hey, |
Avro Container
AvroConvert.DeserializeContainer()
for deserialization (of IEnumerable<>).AvroConvert.SerializeContainer()
for serialization (of IEnumerable<>).IsEnumerable()
toType
extensions.Resolver.ResolveArray()
*** I haven't had time to test everything as I only needed serialization for Azure Data Explorer